// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/21/2015 8:12:53 PM				
// -----------------------------

#ifndef _ThreadHandler_h
#define _ThreadHandler_h

#include "Common.h"
#include "IThread.h"

#include <Windows.Foundation.h>
#include <Windows.System.Threading.h>
#include <wrl/event.h>

using namespace ABI::Windows::Foundation;
using namespace ABI::Windows::System::Threading;
using namespace Microsoft::WRL;
using namespace Microsoft::WRL::Wrappers;
using namespace Platform;

namespace Flow
{
	class CThread;
}

class ThreadHandler
{
public:

	static Bool				Initialize();
	static void				Uninitialize();
	static Bool				IsInitialized();

	static IAsyncAction*	RunASync(Flow::CThread* lpThread);

private:

	static Bool					s_IsInitialized;
	static IThreadPoolStatics*	s_lpThreadPool;

};

#endif